/*  

 * @(#) Constants.java Create on 2014-03-13 下午04:03:30   
 *   
 * Copyright 2014 by fibrlink.   
 */

package com.springdemo.module.systemmanager.dao;


import com.springdemo.basic.global.dao.BaseDao;
import com.springdemo.module.systemmanager.entity.MenuPage;
import com.springdemo.module.systemmanager.entity.myentity.MyMenu;

import java.util.List;
import java.util.Map;



/**
 * 
 * @author qiaowan 
 * @date   2014-03-13
 */
public interface MenuDao<T> extends BaseDao<T> {
	/**
	 * 异步获取菜单信息
	 * @Title: queryMenuList
	 * @data:2014-4-21下午03:15:50
	 * @author:qiaowan
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public List<MyMenu> queryMenuList( String id ) throws Exception;
	/**
	 * 获取所有的菜单信息
	 * @Title: findAllModuleList
	 * @data:2014-4-21下午03:14:36
	 * @author:qiaowan
	 *
	 * @return
	 * @throws Exception
	 */
	public List<MyMenu> findAllModuleList() throws Exception;
	/**
	 * 异步获取菜单列表
	 * @Title: getmenuList
	 * @data:2014-3-18上午10:15:55
	 * @author:qiaowan
	 *
	 * @param 
	 * @return
	 */
	public List<MyMenu> getmenuList( MenuPage menuPage )throws Exception;
	/**
	 * 得到菜单列表 根据pid 
	 * @Title: getmenuList
	 * @data:2014-3-18上午10:15:55
	 * @author:qiaowan
	 *
	 * @param 
	 * @return
	 */
	public int getChildCount( String pid )throws Exception;
	/**
	 * 根据id获取对象
	 * @Title: queryMById
	 * @data:2014-3-13下午04:24:44
	 * @author:qiaowan
	 *
	 * @return
	 * @throws Exception
	 */
	public MyMenu queryMById( MenuPage menuPage )throws Exception;
	/**
	 * 修改排序 新大于旧
	 * @Title: updateSort
	 * @data:2014-3-13下午04:24:14
	 * @author:qiaowan
	 *
	 * @throws Exception
	 */
	public void updateSort( Map<String, String> map )throws Exception;
	/**
	 * 修改排序 旧大于新
	 * @Title: updateSort
	 * @data:2014-3-13下午04:24:14
	 * @author:qiaowan
	 *
	 * @throws Exception
	 */
	public void updateSort1( Map<String, String> map )throws Exception;
	/**
	 * 删除菜单时修改排序
	 * @Title: updateSort1
	 * @data:2014-3-13下午04:23:11
	 * @author:qiaowan
	 *
	 * @throws Exception
	 */
	public void updateSortByDelete( Map<String, String> map )throws Exception;
	/**
	 * 判断url是否重复
	 * @Title: hasUrl
	 * @data:2014-3-18上午10:15:19
	 * @author:qiaowan
	 *
	 * @return
	 * @throws Exception
	 */
	public int hasUrlOrName( MenuPage menuPage )throws Exception;
	
	/**
	 * 获取用户所有页面权限
	 * @Title: getUserAllPageList
	 * @data:2014-4-9上午10:52:07
	 * @author:san
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public List<String>  getUserAllPageList( String id )throws Exception;
	
	/**
	 * 获取用户所有功能权限
	 * @Title: getUserFunction
	 * @data:2014-4-9上午11:05:26
	 * @author:san
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public List<String> getUserFunction( String id )throws Exception;
	/**
	 * 递归获取菜单
	 * @Title: renderChildrenTree
	 * @data:2014-4-28下午03:47:23
	 * @author:qiaowan
	 *
	 * @param entity
	 * @return
	 * @throws Exception
	 */
	public List<MyMenu> queryMenuListBySyn( MyMenu entity ) throws Exception;
	/**
	 * 异步取所有的权限
	 * @Title: queryMenuListByAdmin
	 * @data:2014-5-4上午11:34:57
	 * @author:qiaowan
	 *
	 * @param entity
	 * @return
	 * @throws Exception
	 */
	public List<MyMenu> queryMenuListByAdmin( MyMenu entity ) throws Exception;

    /**
     * 是否有此菜单功能
     * @return
     * @throws Exception
     */
    public int queryMenuCount( Map<String, String> map )throws  Exception;
}
